package com.smartao.core.security;

import com.smartao.core.config.BaseConfig;

public class LoginConfig extends BaseConfig {
	
	private static final long serialVersionUID = -6899305510706288165L;

	public LoginConfig() {
		super("login.");
	}
	
	private String enableCaptcha = Boolean.FALSE.toString();
	private String enableSSO = Boolean.FALSE.toString();
	private String enableRemember = Boolean.FALSE.toString();
	private String enableUSB = Boolean.FALSE.toString();
	private String enableDynamicpass = Boolean.FALSE.toString();

	private String providers;
	private String maximumSessions = "-1";
	private String maximumException = Boolean.FALSE.toString();

	public static boolean enableCaptcha() {
		return Boolean.parseBoolean(getProperty("login.enableCaptcha"));
	}

	public static boolean enableSSO() {
		return Boolean.parseBoolean(getProperty("login.enableSSO"));
	}

	public static boolean enableRemember() {
		return Boolean.parseBoolean(getProperty("login.enableRemember"));
	}

	public static boolean enableUSB() {
		return Boolean.parseBoolean(getProperty("login.enableUSB"));
	}

	public static boolean enableDynamicpass() {
		return Boolean.parseBoolean(getProperty("login.enableDynamicpass"));
	}
	
	/*===========以下为get和set方法=================*/

	public String getEnableCaptcha() {
		return enableCaptcha;
	}

	public void setEnableCaptcha(String enableCaptcha) {
		this.enableCaptcha = enableCaptcha;
	}

	public String getEnableSSO() {
		return enableSSO;
	}

	public void setEnableSSO(String enableSSO) {
		this.enableSSO = enableSSO;
	}

	public String getEnableRemember() {
		return enableRemember;
	}

	public void setEnableRemember(String enableRemember) {
		this.enableRemember = enableRemember;
	}

	public String getEnableUSB() {
		return enableUSB;
	}

	public void setEnableUSB(String enableUSB) {
		this.enableUSB = enableUSB;
	}

	public String getEnableDynamicpass() {
		return enableDynamicpass;
	}

	public void setEnableDynamicpass(String enableDynamicpass) {
		this.enableDynamicpass = enableDynamicpass;
	}

	public String getProviders() {
		return providers;
	}

	public void setProviders(String providers) {
		this.providers = providers;
	}

	public String getMaximumSessions() {
		return maximumSessions;
	}

	public void setMaximumSessions(String maximumSessions) {
		this.maximumSessions = maximumSessions;
	}

	public String getMaximumException() {
		return maximumException;
	}

	public void setMaximumException(String maximumException) {
		this.maximumException = maximumException;
	}
	
}
